﻿@model dynamic

@{
	Layout = null;
}

<!DOCTYPE html>

<html>
	<head>
		<link href="~/Content/bootstrap.css" rel="stylesheet" />
		<script src="~/Scripts/jquery-1.9.1.js"></script>
		<script src="~/Scripts/bootstrap.js"></script>
		<title>title</title>
	</head>
	<body>
		<a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a>
		<!-- Modal -->
		<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h3 id="myModalLabel">Modal header</h3>
			</div>
			<div class="modal-body">
				<p>modal body....…</p>
			</div>
			<div class="modal-footer">
				<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
				<button class="btn btn-primary">Save changes</button>
			</div>
		</div>
		<br/>
		<div class="icon-arrow-right"></div>
		<button id="testBtn" class="btn">TEST</button>
		<div class="btn-group-vertical" data-toggle="buttons-radio">
			<button type="button" class="btn btn-primary" style="width: 100px;">Left hur ser det här ut om vi har ett långt långt långt meddelande lorem ipsum lorem ipsum lorem ipsum lorem lorem</button>
			<button type="button" class="btn btn-primary"  style="width: 100px;">Middle</button>
			<button type="button" class="btn btn-primary" style="width: 100px;">Right</button>
		</div>
		
		<label class="radio">
			
			<label class="radio"><input type="radio" /></label>
			<label class="radio">askdajsdhjkashdjaskd</label>
			<label class="radio">askdajsdhjkashdjaskd</label>
			<label class="radio">askdajsdhjkashdjaskd</label>
			<label class="radio">askdajsdhjkashdjaskd</label>
		</label>
		<input type="text" id="inpName" style="width: 100px;">namn</input>
		<input type="text" id="inpMoney" style="width: 100px;">1000</input>
		<button class="btn btn-primary" id="addBtn">Add something</button>
		<button class="btn btn-primary" id="readBtn">Read something</button>
		<script type="text/javascript">
			$(function() {
				$('#testBtn').click(function () {
					console.log(new Date() + ' start');
					$.get('Home/AllRules/', function(data) {
						console.log(data);
					});
					console.log(new Date() + ' stop');
					//$.ajax({
					//	url: 'Home/AllRules2/',
					//	succes: function(data) {
					//		console.log('det funkar');
					//	},
					//	error: function(e) {
					//		console.log(e);
					//	}
					//});
				});

				$('#addBtn').click(function () {

					var name = $('#inpName').text;
					var money = $('#inpMoney').text;
					$.post('Home/Add?Name=' + name + '&Money='+money);
				});
				

				$('#readBtn').click(function () {
					var name = $('#inpName').text;
					console.log(name);
					$.get('Home/Read?Name='+name,function(data) {
						console.log('reading.....');
						console.log(data);
					});
				});
			});
		</script>
	</body>
</html>